import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src'), // 将 '@' 别名为 src 目录
            // 你可以根据需要添加更多的别名
            '@components': path.resolve(__dirname, 'src/components'),
            '@views': path.resolve(__dirname, 'src/views'),
            '@api': path.resolve(__dirname, 'src/api'),
            '@utils': path.resolve(__dirname, 'src/utils'),
            '@assets': path.resolve(__dirname, 'src/assets'),
        },
    },
    server: {
        port: 9001,
        host: '0.0.0.0'
    },
    build: {
        outDir: 'dist',
    }
})
